package com.one.rope.mvp.basecore.bean;

import com.one.rope.mvp.basecore.exception.BaseException;
import lombok.Data;

/**
 * @author Weijian.liu
 * @desc 业务响应码父类
 * @date 2018/12/19
 */
@Data
public class BusinessMessage {

  public static final String SUCCESS_MESSAGE = "success";

  public static final int SUCCESS_CODE = 0;

  public static final String FAILURE_MESSAGE = "系统错误";

  public static final int FAILURE_CODE = BaseException.FAILURE_CODE;

  public static final int USERFAILURE_CODE = BaseException.USERFAILURE_CODE;

  // 成功&失败
  public final static ResponseMessage SYSTEM_ERROR = ResponseMessage.instance(FAILURE_CODE, FAILURE_MESSAGE);

  public final static ResponseMessage USER_ERROR = ResponseMessage.instance(USERFAILURE_CODE, "操作失败");

  public final static ResponseMessage SYSTEM_OK = ResponseMessage.instance(SUCCESS_CODE, SUCCESS_MESSAGE);

  /**
   * 登录认证
   */
  public final static ResponseMessage NOT_VISIT_PERMISSION = ResponseMessage.instance(1101, "没有访问权限");
  public final static ResponseMessage NOT_LOGIN_IN = ResponseMessage.instance(1102, "未登录");
  public final static ResponseMessage FORBIDDEN_VISIT = ResponseMessage.instance(1103, "禁止访问");
  public final static ResponseMessage TOKEN_IS_EXPIRE = ResponseMessage.instance(1104, "Token不存在或者已过期");
  public final static ResponseMessage ACCOUNT_NOT_EXIST = ResponseMessage.instance(1105, "登录账号不存在");
  public final static ResponseMessage ACCOUNT_OR_PWD_ERROR = ResponseMessage.instance(1106, "账号或密码错误");
  public final static ResponseMessage ACCOUNT_BEEN_FORBIDEN = ResponseMessage.instance(1107, "账号被禁用");
  public final static ResponseMessage NOT_SYSTEM_PERMISSION = ResponseMessage.instance(1108, "账号没有访问系统权限");
  public final static ResponseMessage GENERATE_TOKEN_FAIL = ResponseMessage.instance(1109, "生成登录标识失败");
  public final static ResponseMessage SYSTEM_DISABLED = ResponseMessage.instance(1110, "系统已经禁止访问");

  /**
   * 小程序
   */
  public final static ResponseMessage SMS_SEND_FAILURE = ResponseMessage.instance(1111, "短信发送失败");
  public final static ResponseMessage VERIFY_CODE_EXPIRED = ResponseMessage.instance(1112, "验证码已过期，重新获取");
  public final static ResponseMessage VERIFY_CODE_ERROR = ResponseMessage.instance(1113, "验证码错误");
  public final static ResponseMessage MOBILE_IS_USERD = ResponseMessage.instance(1114, "该手机号已经被使用，请更换手机号");
  public final static ResponseMessage NOT_VISTI_INDEX = ResponseMessage.instance(1115, "请完善资料后再试");
}
